<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>每日医疗记账</title>
</head>
<body>
<div id="tallypanel"  class="easyui-panel" data-options="fit:true,border:false,onOpen:createTallyID">
	<form action="to_addTally" id="addTally_form" method="post">
		<fieldset class="field">
			<legend>账单基本信息</legend>

			<table class="tally" style="width: 100%; padding: 2px 3px;">
				<tr>
					<td width="25%"><input name="tallyTable.tallyid" style="width: 80%;" readonly="readonly" id="tally_id"
						class="easyui-textbox" label="记账单号：" data-options="required:true"></td>
					<td width="25%"><input style="width: 80%;" id="tally_LivePatientID"
						class="easyui-textbox" name="liveID" label="住院号：" id="tally_LivePatientLiveID"
						data-options="buttonIcon:'icon-search',required:true,
						onClickButton:createSelectLiveInWindow"></td>
					<td width="25%"><input name="tallyTable.patientname5" style="width: 80%;" readonly="readonly" id="tally_LivePatientName"
						class="easyui-textbox" label="病人姓名：" data-options="required:true"></td>
					<td width="25%"><input name="tallyTable.livetype" style="width: 80%;" readonly="readonly" id="tally_LivePatientType"
						class="easyui-textbox" label="住院类型："data-options="required:true"></td>
				</tr>
				<tr>
					<td width="25%"><input name="tallyTable.tallytime" style="width: 80%;"
						class="easyui-datebox" label="记账时间：" value="1"></td>
					<td width="25%"><input name="tallyTable.depositlimit4" style="width: 80%;" readonly="readonly"
						class="easyui-textbox" label="押金额度：" data-options="required:true" id="tally_LivePatientDeposit"></td>
					<td width="25%"><input name="tallyTable.lacklimit" class="easyui-textbox" label="未结费用:"
						data-options="width:'80%',required:true" id="tally_LivePatientNopay"></td>
					<td width="25%"><input name="tallyTable.balance" class="easyui-textbox" label="费用余额:"
						data-options="width:'80%',required:true" id="tally_LivePatientBalance"></td>
				</tr>

			</table>

		</fieldset>

	<div style="margin: 0px 15px;">
		<fieldset class="field" style="height: 350px;">
			<legend>账单详细</legend>

			<div style="margin-bottom: 10px;">
				<input style="width: 15%;" class="easyui-textbox" label="收费项目:" id="tally_chargeProjectName"  
					labelWidth="60px;"data-options="buttonIcon:'icon-search',onClickButton:
						function(){openSelectTallyDetialWindow();}"> 
			    <input style="width: 10%;" class="easyui-textbox" label="单价:" id="tally_chargeProjectPrice" readonly="readonly" 
					labelWidth="35px;"> 
				<input  style="width: 10%;"  class="easyui-numberspinner"  id="tally_chargeProjectNumber"
					value="1" prompt="数量" label="数量:" labelWidth="35px;" data-options="increment:1,
					onSpinUp:countTotalTallyDetial,onSpinDown:countTotalTallyDetial">
				<input style="width: 10%;" readonly="readonly"  id="tally_chargeProjectSum"
					labelWidth="35px;" class="easyui-textbox" label="总计:"> 
				<a href="#" class="easyui-linkbutton" 
					data-options="iconCls:'icon-add',onClick:addTallyDetial">添加零细</a> 
				<a href="#"  class="easyui-linkbutton" 
					data-options="iconCls:'icon-clear',onClick:deleteTallyDetialFromTallyPage">删除零细</a>
			</div>


			<table class="easyui-datagrid" id="tally_Detial_Table"
				data-options="singleSelect:true,height:'88%',width:'100%',
	                border:false,
					">
				<thead>
					<tr>
						<th style="width: 15%;" data-options="field:'chargecodeid',align:'center'">收费代码</th>
						<th style="width: 12%;" data-options="field:'chargename',align:'center'">收费项目</th>
						<th style="width: 12%;" data-options="field:'feetype',align:'center'">费用类型</th>
						<th style="width: 9%;" data-options="field:'unit3',align:'center'">单位</th>
						<th style="width: 9%;" data-options="field:'price3',align:'center'">单价</th>
						<th style="width: 11%;" data-options="field:'number',align:'center'">数量</th>
						<th style="width: 11%;" data-options="field:'sum',align:'center'">总计金额</th>
						<th style="width: 11%;" data-options="field:'tallydetailsstatus',align:'center'">核算状态</th>
						<th style="width: 11%;" data-options="field:'admin4',align:'center'">经办人</th>
					</tr>
				</thead>
			</table>
		</fieldset>
	</div>
	<div style="margin-left: 25px;">
		账单合计<input name="tallyTable.tallytotal" class="tallyinput" value="0.00" readonly="readonly" id="tallyTotal"> 
		核算状态<input name="tallyTable.tallystatus" class="tallyinput" value="未核算" readonly="readonly"> 
		结算状态<input name="tallyTable.paystatus2" class="tallyinput" value="未结算" readonly="readonly"> 
		经办人<input  name="tallyTable.admin4" class="tallyinput" readonly="readonly" value="李逸"> 
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',onClick:addTallyFrom">新建医疗账单</a> 
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',onClick:resetTallyPage">重置账单</a>
	</div>
 </form>
	<div id="windowChargeProject" class="easyui-window" title="收费项目"
		data-options="collapsible:false,minimizable:false,maximizable:true,
		modal:true,iconCls:'icon-search',closed:true,href:'to_hspt_live_chargeProject'"
		style="width: 70%; height: 80%; padding: 2px;">
	</div>
</div>

	<style type="text/css">
.tally td {
	padding: 2px 1px;
}

.field {
	border: 1px solid gray;
	border-radius: 5px;
	margin: 10px;
}

.tallyinput {
	width: 100px;
	height: 18px;
	vertical-align: middle;
	border-radius: 3px;
	border: 1px solid gray;
	font-size: 12px;
	color: red;
}
</style>
</body>
</html>